package com.vimi8.ebb.api.category;


import com.vimi8.ebb.configuration.HttpResponseEntity;
import com.vimi8.ebb.dto.CategoryDto;
import com.vimi8.ebb.dto.EnumCategoryDto;
import com.vimi8.ebb.model.EnumCategory;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringCodegen", date = "2016-09-19T10:01:46.405Z")

@Api(value = "category", description = "枚举分类控制器")
@RestController
public interface CategoryApi {

    @ApiOperation(value = "删除分类信息", notes = "删除分类信息.", response = String.class, tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/category/",
            method = RequestMethod.DELETE)
    HttpResponseEntity<String> categoryDelete(@ApiParam(value = "删除枚举分类信息.", required = true) @RequestParam(value = "id", required = true) String id


    );


    @ApiOperation(value = "更新分类信息", notes = "更新分类信息.", response = String.class, tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/category/",
            method = RequestMethod.PUT)
    HttpResponseEntity<String> categoryPut(

            @ApiParam(value = "更新分类信息", required = true) @RequestBody EnumCategory enumCategory

    );


    @ApiOperation(value = "根据分类id和分类级别查询分类信息", notes = "根据分类id和分类级别查询分类信息.", response = EnumCategory.class, responseContainer = "List", tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,对象列表", response = EnumCategory.class) })
    @RequestMapping(value = "/category/",
            method = RequestMethod.GET)
    HttpResponseEntity<List<EnumCategory>> responseEnumCategoryByCateIdUsingGET(@ApiParam(value = "分类id", required = true) @RequestParam(value = "id", required = true) String id


            , @ApiParam(value = "分类级别", required = true) @RequestParam(value = "level", required = true) String level


    );


    @ApiOperation(value = "添加枚举分类信息", notes = "添加枚举分类信息.", response = String.class, tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/category/",
            method = RequestMethod.POST)
    HttpResponseEntity<String> userCategoryPostUsingPOST(

            @ApiParam(value = "添加枚举分类信息", required = true) @RequestBody EnumCategory enumCategory

    );

    @ApiOperation(value = "根据分类id和分类级别查询分类信息", notes = "根据分类id和分类级别查询分类信息.", response = EnumCategory.class, responseContainer = "List", tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,对象列表", response = EnumCategory.class) })
    @RequestMapping(value = "/category/categoryByList",
            method = RequestMethod.GET)
    HttpResponseEntity<List<CategoryDto>> responseEnumCategoryUsingGET(@ApiParam(value = "分类id", required = true) @RequestParam(value = "id", required = true) String id
            , @ApiParam(value = "分类级别", required = true) @RequestParam(value = "level", required = true) String level


    );

    @ApiOperation(value = "查询农场的分类", notes = "查询农场的分类", response = EnumCategory.class, responseContainer = "List", tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,对象列表", response = EnumCategory.class) })
    @RequestMapping(value = "/category/farmCategoryList",
            method = RequestMethod.GET)
    HttpResponseEntity<List<EnumCategory>> farmCategoryGET(

    );

    @ApiOperation(value = "根据分类id和分类级别查询分类信息包含该分类下的数量", notes = "根据分类id和分类级别查询分类信息.", response = EnumCategory.class, responseContainer = "List", tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,对象列表", response = EnumCategory.class) })
    @RequestMapping(value = "/category/categoryListByHome",
            method = RequestMethod.GET)
    HttpResponseEntity<List<EnumCategoryDto>> enumCategoryDtoGET(
            @ApiParam(value = "分类id", required = true) @RequestParam(value = "id", required = true) String id,
            @ApiParam(value = "分类级别", required = true) @RequestParam(value = "level", required = true) String level,
            @ApiParam(value = "查询分类（0表示农场，1表示产品）", required = true) @RequestParam(value = "classification", required = true) int classification
    );

    @ApiOperation(value = "根据分类id的范围查询分类信息", notes = "根据分类id的范围查询分类信息.", response = EnumCategory.class, responseContainer = "List", tags={ "枚举相关分类信息", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,对象列表", response = EnumCategory.class) })
    @RequestMapping(value = "/category/range",
            method = RequestMethod.GET)
    HttpResponseEntity<List<EnumCategory>> getCategoryByRange(
            @ApiParam(value = "最小分类id", required = true) @RequestParam(value = "min", required = true) String min,
            @ApiParam(value = "最大分类id", required = true) @RequestParam(value = "max", required = true) String max
    );

}
